import {BrowserRouter, Routes, Route} from "react-router-dom";
import ReactDOM from "react-dom";
import NoUserHome from "./components/noUserHome/noUserHome";
import Register from "./components/register/register";
import Login from "./components/login/Login";
import UserHome from "./components/sucessLogin/userHome/userHome";
import LoginOut from "./components/sucessLogin/loginOut/loginOut";
import Publish from "./components/sucessLogin/publish/Publish";
import MyCollections from "./components/sucessLogin/myCollections/myCollections";
import SelfHeader from "./components/sucessLogin/selfHeader/selfHeader";
import CardDetails from "./components/cardDetails/cardDetails";
ReactDOM.render(
    <BrowserRouter>
        <Routes>
            <Route path="/" element={<NoUserHome />}>
                <Route path="/loginOut" element={<LoginOut/> }></Route>
            </Route>
            <Route path="/register" element={<Register/>}></Route>
            <Route path="/login" element={<Login />}></Route>
            <Route path="/home" element={<SelfHeader />} >
                <Route path="user" element={<UserHome/>}/>
                <Route path="my-collections" element={<MyCollections/>}/>
                <Route path="publish" element={<Publish />} />
                <Route path=":card_id" element={<CardDetails />}/>
            </Route>



        </Routes>
    </BrowserRouter>,
    document.getElementById('root')
)